DOCKER_VER=230704
DOCKER_NAME=datasource
DOCKER_HUB=docker.io
DOCKER_GROUP=chenjingdong
HOST=10.2.1.130
USER=uploader
PASS=123456



docker:
	set DOCKER_BUILDKIT=0
	docker build --tag=$(DOCKER_HUB)/$(DOCKER_GROUP)/$(DOCKER_NAME):$(DOCKER_VER) -f docker/Dockerfile .

save:
	docker save -o ../docker-tars/we-datasource-$(DOCKER_VER).tar $(DOCKER_HUB)/$(DOCKER_GROUP)/$(DOCKER_NAME):$(DOCKER_VER)

sftp:
	- echo $(PASS)
	scp ../docker-tars/we-datasource-$(DOCKER_VER).tar $(USER)@$(HOST):/opt/docker-tars

build:
	mvn clean package

everything: build docker save

.PHONY: everything docker build sftp save

everything: docker save